import time

#Globals
MOUSE_OVER = 1
MOUSE_OFF = 2
MOUSE_LEFT_CLICK = 3
MOUSE_MIDDLE_CLICK = 4
MOUSE_RIGHT_CLICK = 5

class sensor(object):
    def __init__(self):
        self.always = False
        self.fequency = 1.0 
    def execute(self):
        pass
    
class always(sensor):
    def __init__(self, fequency=None):
        controller().__init__(self)
        self.always = True
        self.fequency = fequency
        self.ctime = time.time()
    def execute(self):
        if self.fequency != None:
            if time.time() - self.ctime >= self.fequency:
                return True
            else:
                return False
        else:
            return True

class mouse(sensor):
    def __init__(self,mouseType):
        controller().__init__(self)
